package com.will.server.controller;

import com.google.gson.Gson;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class TaskController {
    /**
     * Auther sun
     * DATE 2023/1/26 15:26
     * VERSION 1.0
     */

    @PostMapping("/task/finishTask")
    public String finishTask(@RequestBody String json) {
        Gson gson = new Gson();
        Map<String, Object> map = gson.fromJson(json, Map.class);
        String openid = (String)map.get("openid");
        return "ok";
    }
}
